//
//  LCInfoTbCell.m
//  TheLCNews
//
//  Created by apple on 15/11/26.
//  Copyright © 2015年 LC. All rights reserved.
//

#import "LCInfoTbCell.h"

@implementation LCInfoTbCell

#pragma mark 初始化方法
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

#pragma mark 协议方法
- (void)createView{
    self.titleLabel = [[UILabel alloc] init];
//        self.titleLabel.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.titleLabel];
    
    
    self.leftImage = [[UIImageView alloc] init];
//    self.leftImage.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.leftImage];
   
    self.leftImage.layer.shadowOffset = CGSizeMake(0, 0);
    self.leftImage.layer.shadowColor = [UIColor blackColor].CGColor;
    self.leftImage.layer.shadowOpacity = 0.8;
    self.leftImage.layer.shadowRadius = 1;
    
    self.centerImage = [[UIImageView alloc] init];
//    self.centerImage.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.centerImage];
    
    self.centerImage.layer.shadowOffset = CGSizeMake(0, 0);
    self.centerImage.layer.shadowColor = [UIColor blackColor].CGColor;
    self.centerImage.layer.shadowOpacity = 0.8;
    self.centerImage.layer.shadowRadius = 1;
    
    self.rightImage = [[UIImageView alloc] init];
//    self.rightImage.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:self.rightImage];
    
    self.rightImage.layer.shadowOffset = CGSizeMake(0, 0);
    self.rightImage.layer.shadowColor = [UIColor blackColor].CGColor;
    self.rightImage.layer.shadowOpacity = 0.8;
    self.rightImage.layer.shadowRadius = 1;
    
    // 时间
    self.updateTimeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.updateTimeLabel];
    
//        self.updateTimeLabel.backgroundColor = [UIColor yellowColor];
    self.updateTimeLabel.font = [UIFont systemFontOfSize:12.];
//    self.updateTimeLabel.textColor = [UIColor grayColor];
    
    // 评论
    self.commentLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.commentLabel];
   
//    self.commentLabel.backgroundColor = [UIColor greenColor];
    self.commentLabel.font = [UIFont systemFontOfSize:12.];
//    self.commentLabel.textColor = [UIColor grayColor];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(CWIDTH / 30, KHEIGHT / 66.7, CWIDTH / 1.07, KHEIGHT / 23.8);
    self.leftImage.frame = CGRectMake(CWIDTH / 30, KHEIGHT / 16.675, CWIDTH / 3.41, KHEIGHT / 7.85);
    self.centerImage.frame = CGRectMake(CWIDTH / 2.8, KHEIGHT / 16.675, CWIDTH / 3.41, KHEIGHT / 7.85);
    self.rightImage.frame = CGRectMake(CWIDTH / 1.49, KHEIGHT / 16.675, CWIDTH / 3.41, KHEIGHT / 7.85);
    self.updateTimeLabel.frame = CGRectMake(CWIDTH / 30, KHEIGHT / 16.675 + KHEIGHT / 7.85 +5, CWIDTH / 5, 20);
    self.commentLabel.frame = CGRectMake(CWIDTH / 1.21, KHEIGHT / 16.675 + KHEIGHT / 7.85 +5, CWIDTH / 5, 20);
    
}











/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
